<template>
    <div>
        <button @click="open_tips">提示框</button>
        <button @click="open_dialog">对话框</button>
    </div>
</template>

<script>
//组件详见src/components
export default {
    data(){
        return {

        }
    },
    methods: {
        open_tips(){
            this.$dialog.alert('dialog提示');
        },
        open_dialog(){
            this.$dialog.confirm({
                title: '这是标题',
                content: '<h2>这是内容</h2>',
                ok(){
                    console.log('点了确定')
                },
                okVal: '我知道了',
                cancel(){
                    console.log('取消了')
                },
                cancelVal: '取消啦'
            })
        }
    }
}
</script>
